using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._LinearReferencingTools
{
    /// <summary>
    /// <para>Make Route Event Layer</para>
    /// <para>Creates a temporary feature layer using routes and route events.</para>
    /// <para>使用路径和路径事件创建临时要素图层。</para>
    /// </summary>    
    [DisplayName("Make Route Event Layer")]
    public class MakeRouteEventLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MakeRouteEventLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_routes">
        /// <para>Input Route Features</para>
        /// <para>The route features upon which events will be located.</para>
        /// <para>路线特征将位于哪些事件上。</para>
        /// </param>
        /// <param name="_route_id_field">
        /// <para>Route Identifier Field</para>
        /// <para>The field containing values that uniquely identify each route.</para>
        /// <para>包含唯一标识每个路由的值的字段。</para>
        /// </param>
        /// <param name="_in_table">
        /// <para>Input Event Table</para>
        /// <para>The table whose rows will be located along routes.</para>
        /// <para>其行将沿路径定位的表。</para>
        /// </param>
        /// <param name="_in_event_properties">
        /// <para>Event Table Properties</para>
        /// <para><xdoc>
        ///   <para>Parameter consisting of the route location fields and the type of events in the input event table.</para>
        ///   <bulletList>
        ///     <bullet_item>Route Identifier Field—The field containing values that indicate the route on which each event is located. This field can be numeric or character.</bullet_item><para/>
        ///     <bullet_item>Event Type—The type of events in the input event table (POINT or LINE).
        ///     <bulletList>
        ///       <bullet_item>POINT—Point events occur at a precise location along a route. Only a from-measure field must be specified.  </bullet_item><para/>
        ///       <bullet_item>LINE—Line events define a portion of a route. Both from- and to-measure fields must be specified.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure Field—A field containing measure values. This field must be numeric and is required when the event type is POINT or LINE. Note when the Event Type is POINT, the label for this parameter becomes Measure Field.</bullet_item><para/>
        ///     <bullet_item>To-Measure Field—A field containing measure values. This field must be numeric and is required when the event type is LINE.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>由路径位置字段和输入事件表中的事件类型组成的参数。</para>
        ///   <bulletList>
        ///     <bullet_item>路径标识符字段 - 包含指示每个事件所在路径的值的字段。此字段可以是数字或字符。</bullet_item><para/>
        /// <bullet_item>事件类型 - 输入事件表中的事件类型（POINT 或 LINE）。
        ///     <bulletList>
        ///       <bullet_item>POINT - 点事件发生在沿路径的精确位置。只需指定 from-measure 字段。 </bullet_item><para/>
        ///       <bullet_item>LINE - 线事件定义路径的一部分。必须同时指定 from-measure 和 to-measure 字段。 </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure 字段 - 包含测量值的字段。此字段必须为数值，并且在事件类型为 POINT 或 LINE 时为必填字段。注意：当“事件类型”为“点”时，此参数的标签将变为“测量字段”。</bullet_item><para/>
        ///     <bullet_item>待测量字段 （To-Measure Field） - 包含测量值的字段。此字段必须为数值，当事件类型为 LINE 时为必填字段。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_layer">
        /// <para>Layer Name or Table View</para>
        /// <para>The layer to be created. This layer is stored in memory, so a path is not necessary.</para>
        /// <para>要创建的图层。此层存储在内存中，因此不需要路径。</para>
        /// </param>
        public MakeRouteEventLayer(object _in_routes, object _route_id_field, object _in_table, object _in_event_properties, object _out_layer)
        {
            this._in_routes = _in_routes;
            this._route_id_field = _route_id_field;
            this._in_table = _in_table;
            this._in_event_properties = _in_event_properties;
            this._out_layer = _out_layer;
        }
        public override string ToolboxName => "Linear Referencing Tools";

        public override string ToolName => "Make Route Event Layer";

        public override string CallName => "lr.MakeRouteEventLayer";

        public override List<string> AcceptEnvironments => ["configKeyword", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_routes, _route_id_field, _in_table, _in_event_properties, _out_layer, _offset_field, _add_error_field.GetGPValue(), _add_angle_field.GetGPValue(), _angle_type.GetGPValue(), _complement_angle.GetGPValue(), _offset_direction.GetGPValue(), _point_event_type.GetGPValue()];

        /// <summary>
        /// <para>Input Route Features</para>
        /// <para>The route features upon which events will be located.</para>
        /// <para>路线特征将位于哪些事件上。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Route Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_routes { get; set; }


        /// <summary>
        /// <para>Route Identifier Field</para>
        /// <para>The field containing values that uniquely identify each route.</para>
        /// <para>包含唯一标识每个路由的值的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route Identifier Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _route_id_field { get; set; }


        /// <summary>
        /// <para>Input Event Table</para>
        /// <para>The table whose rows will be located along routes.</para>
        /// <para>其行将沿路径定位的表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Event Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_table { get; set; }


        /// <summary>
        /// <para>Event Table Properties</para>
        /// <para><xdoc>
        ///   <para>Parameter consisting of the route location fields and the type of events in the input event table.</para>
        ///   <bulletList>
        ///     <bullet_item>Route Identifier Field—The field containing values that indicate the route on which each event is located. This field can be numeric or character.</bullet_item><para/>
        ///     <bullet_item>Event Type—The type of events in the input event table (POINT or LINE).
        ///     <bulletList>
        ///       <bullet_item>POINT—Point events occur at a precise location along a route. Only a from-measure field must be specified.  </bullet_item><para/>
        ///       <bullet_item>LINE—Line events define a portion of a route. Both from- and to-measure fields must be specified.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure Field—A field containing measure values. This field must be numeric and is required when the event type is POINT or LINE. Note when the Event Type is POINT, the label for this parameter becomes Measure Field.</bullet_item><para/>
        ///     <bullet_item>To-Measure Field—A field containing measure values. This field must be numeric and is required when the event type is LINE.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>由路径位置字段和输入事件表中的事件类型组成的参数。</para>
        ///   <bulletList>
        ///     <bullet_item>路径标识符字段 - 包含指示每个事件所在路径的值的字段。此字段可以是数字或字符。</bullet_item><para/>
        /// <bullet_item>事件类型 - 输入事件表中的事件类型（POINT 或 LINE）。
        ///     <bulletList>
        ///       <bullet_item>POINT - 点事件发生在沿路径的精确位置。只需指定 from-measure 字段。 </bullet_item><para/>
        ///       <bullet_item>LINE - 线事件定义路径的一部分。必须同时指定 from-measure 和 to-measure 字段。 </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>From-Measure 字段 - 包含测量值的字段。此字段必须为数值，并且在事件类型为 POINT 或 LINE 时为必填字段。注意：当“事件类型”为“点”时，此参数的标签将变为“测量字段”。</bullet_item><para/>
        ///     <bullet_item>待测量字段 （To-Measure Field） - 包含测量值的字段。此字段必须为数值，当事件类型为 LINE 时为必填字段。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Event Table Properties")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_event_properties { get; set; }


        /// <summary>
        /// <para>Layer Name or Table View</para>
        /// <para>The layer to be created. This layer is stored in memory, so a path is not necessary.</para>
        /// <para>要创建的图层。此层存储在内存中，因此不需要路径。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Layer Name or Table View")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_layer { get; set; }


        /// <summary>
        /// <para>Offset Field</para>
        /// <para>The field containing values used to offset events from their underlying route. This field must be numeric.</para>
        /// <para>包含用于从其基础路由偏移事件的值的字段。此字段必须为数值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Offset Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _offset_field { get; set; } = null;


        /// <summary>
        /// <para>Generate a field for locating errors</para>
        /// <para><xdoc>
        ///   <para>Specifies whether a field named LOC_ERROR will be added to the temporary layer that is created.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Do not add a field to store locating errors. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Add a field to store locating errors.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将名为 LOC_ERROR 的字段添加到所创建的临时图层中。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 不添加字段以存储定位错误。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 （Checked） - 添加字段以存储定位错误。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Generate a field for locating errors")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _add_error_field_value _add_error_field { get; set; } = _add_error_field_value._false;

        public enum _add_error_field_value
        {
            /// <summary>
            /// <para>ERROR_FIELD</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ERROR_FIELD")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_ERROR_FIELD</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_ERROR_FIELD")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Generate an angle field</para>
        /// <para><xdoc>
        ///   <para>Specifies whether a field named LOC_ANGLE will be added to the temporary layer that is created. This parameter is only valid when the event type is POINT.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Do not add a field to store locating angles. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Add a field to store locating angles.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将名为 LOC_ANGLE 的字段添加到创建的临时图层中。仅当事件类型为 POINT 时，此参数才有效。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 （Unchecked） - 不添加字段以存储定位角度。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 （Checked） - 添加字段以存储定位角度。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Generate an angle field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _add_angle_field_value _add_angle_field { get; set; } = _add_angle_field_value._false;

        public enum _add_angle_field_value
        {
            /// <summary>
            /// <para>ANGLE_FIELD</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ANGLE_FIELD")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_ANGLE_FIELD</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_ANGLE_FIELD")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Calculated Angle Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of locating angle that will be calculated. This parameter is only valid if Generate an angle field is checked.</para>
        ///   <bulletList>
        ///     <bullet_item>Normal—The normal (perpendicular) angle will be calculated. This is the default.</bullet_item><para/>
        ///     <bullet_item>Tangent—The tangent angle will be calculated.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要计算的定位角度的类型。仅当勾选“生成角度”字段时，此参数才有效。</para>
        ///   <bulletList>
        ///     <bullet_item>法线—将计算法线（垂直）角。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>相切—将计算切角。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Calculated Angle Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _angle_type_value _angle_type { get; set; } = _angle_type_value._NORMAL;

        public enum _angle_type_value
        {
            /// <summary>
            /// <para>Normal</para>
            /// <para>Normal—The normal (perpendicular) angle will be calculated. This is the default.</para>
            /// <para>法线—将计算法线（垂直）角。这是默认设置。</para>
            /// </summary>
            [Description("Normal")]
            [GPEnumValue("NORMAL")]
            _NORMAL,

            /// <summary>
            /// <para>Tangent</para>
            /// <para>Tangent—The tangent angle will be calculated.</para>
            /// <para>相切—将计算切角。</para>
            /// </summary>
            [Description("Tangent")]
            [GPEnumValue("TANGENT")]
            _TANGENT,

        }

        /// <summary>
        /// <para>Write the complement of the angle to the angle field</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the complement of the locating angle will be calculated. This parameter is only valid if Generate an angle field is checked.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Do not write the complement of the angle. Write only the calculated angle. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Write the complement of the angle.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否计算定位角的补码。仅当勾选“生成角度”字段时，此参数才有效。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 （Unchecked） - 不写角度的补码。只写出计算出的角度。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 （Checked） - 写入角度的补码。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Write the complement of the angle to the angle field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _complement_angle_value _complement_angle { get; set; } = _complement_angle_value._false;

        public enum _complement_angle_value
        {
            /// <summary>
            /// <para>COMPLEMENT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("COMPLEMENT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>ANGLE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ANGLE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Events with a positive offset will be placed to the right of the routes</para>
        /// <para><xdoc>
        ///   <para>Specifies the side on which the route events with a positive offset are displayed. This parameter is only valid if an offset field has been specified.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Events with a positive offset will be displayed to the left of the route. The side of the route is determined by the measures and not necessarily the digitized direction. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Events with a positive offset will be displayed to the right of the route. The side of the route is determined by the digitized direction.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定显示具有正偏移量的路由事件的一侧。仅当指定了偏移量字段时，此参数才有效。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 偏移量为正的事件将显示在路径的左侧。路线的一侧由测量决定，而不一定是数字化方向。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中—偏移量为正的事件将显示在路径的右侧。路线的一侧由数字化方向决定。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Events with a positive offset will be placed to the right of the routes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _offset_direction_value _offset_direction { get; set; } = _offset_direction_value._false;

        public enum _offset_direction_value
        {
            /// <summary>
            /// <para>RIGHT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("RIGHT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>LEFT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("LEFT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Point events will be generated as multipoint features</para>
        /// <para><xdoc>
        ///   <para>Specifies whether point events will be treated as point features or multipoint features.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Point events will be treated as point features. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Point events will be treated as multipoint features.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是将点事件视为点要素还是多点要素。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中—点事件将被视为点要素。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中—点事件将被视为多点要素。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Point events will be generated as multipoint features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _point_event_type_value _point_event_type { get; set; } = _point_event_type_value._false;

        public enum _point_event_type_value
        {
            /// <summary>
            /// <para>MULTIPOINT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MULTIPOINT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>POINT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("POINT")]
            [GPEnumValue("false")]
            _false,

        }

        public MakeRouteEventLayer SetEnv(object configKeyword = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(configKeyword: configKeyword, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}